function useState<T>(initialState: T): [T, (newValue: T) => void] {
    let state = initialState
    function setState(newVal: T) {
        state = newVal
    }
    return [state, setState]
}
// 丢失类型
// const [state, setState] = useState(100)


// 正确的类型
const [state, setState] = useState(100)

interface IBanner {
    url: string
    alt: string
}

const [banners, setBanners] = useState<IBanner[]>([])

export { }